<?php 
$dossierId=getParameter("dossierId");
if ($dossierId)
{
	
	?>

	
	<div id="dentpicker" style="display:none" title="Dentition">

	 <script type="text/javascript">

    if (swfobject.hasFlashPlayerVersion("6.0.0")) {
        var fn = function() {
          var att = { data:"/<?=getFilesPath("image")?>/cabinetdentchooser.swf", width:"100%", height:"100%" };
          var par = { wmode:"transparent",flashvars:"host=http://<?=getPortalHost()?>/&dossierId=<?=$dossierId?>" };
          var id = "myContent";
          var myObject = swfobject.createSWF(att, par, id);
        };
        swfobject.addDomLoadEvent(fn);
      }
    </script>
 <div id="myContent">
      </div>
</div>
	
	
	
	<br/>
Liste des médicaments intérdits pour ce patient :<?php



$rs=ew_LoadRecordset("SELECT
cabinet_etatgeneral.libelle,
cabinet_medicaments.libelle as medoc
FROM
cabinet_dossier
INNER JOIN cabinet_etatgeneral ON cabinet_etatgeneral.id = cabinet_dossier.etatGenerale
INNER JOIN cabinet_contreindication ON cabinet_contreindication.etatId = cabinet_etatgeneral.id
INNER JOIN cabinet_medicaments ON cabinet_medicaments.id = cabinet_contreindication.medicamentId
WHERE
cabinet_dossier.id = $dossierId");

while (!$rs->EOF)
{
	
	?>
	<?=$rs->fields["medoc"]?>&nbsp;
	<?php 
	$rs->MoveNext();
}?>

<br/><br/>


Ce patient a reçu la derniere ordonnance a : la date
    <br/><br/>
     <?php



    $rs=ew_LoadRecordset(" SELECT
    cabinet_devis.addate as date
    FROM
    cabinet_devis
    INNER JOIN cabinet_dossier ON cabinet_devis.dossierId = cabinet_dossier.id
    WHERE
    cabinet_devis.dossierId =  $dossierId");

    while (!$rs->EOF)
    {

        $date = $rs->fields["date"] ;
        $rs->MoveNext();
    }


    if($date){ ?>
                          Ce patient a reçu le dernier deivs le : <?=formatDatabaseDatetime($date)  ?>&nbsp;   <br/><br/>
        <?php } else  echo"Ce patient n a jamais reçu de devis" ?>

<?php
}

?>
